<script setup lang="ts">
	import { ref } from 'vue';
		import { onLoad } from '@dcloudio/uni-app'
		const title = ref('花搭搭，让生活不一样的精彩') 
		// const srcStart=ref('/static/images/wolaile.gif')
		
	onLoad(() =>{
		// try {
		const value = uni.getStorageSync('launchFlagv1.0');
		
		if(value){
			// console.log(value, 'launch-onLoad-value - if')
			setTimeout(() => {
				uni.switchTab({
					url:'/pages/index/index'
				});
				// uni.navigateTo({
				// 	url:'/pages/index/index'
				// })
			}, 500)
			
		}else{
		// 	// console.log(value, 'launch-onLoad-value - else')
			uni.redirectTo({
				url:'/pages/index/launch/guide'
			});
		}
	})
</script>

<template>
	<view class="gif-container">
			<!-- <image src="/static/images/start/wolaile.gif" class="wolaile"></image> -->
			<image src="https://flowers.oss-cn-beijing.aliyuncs.com/images/start/wolaile.gif" class="wolaile"></image>
			<text class="slogan">{{title}}</text>
		</view>
</template>

<style>
page{
	background-color: #fff;
}
.gif-container{
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		transform: translateZ(0);
		/* width: 100%;
		height: 1240rpx;
		background-color: #ffffff;
		background-size: cover;
		background-position: center; */
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	.full-height{
		flex: 100;
	}
	.wolaile{
		width: 660rpx;
		height: 660rpx;
		background-color:white;
	}
	.slogan{
		margin-top: 50rpx;
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
